from rest_framework.exceptions import APIException


class PasswordNotEqual(APIException):
    def __init__(self, msg=None):
        self.detail = msg
        self.status_code = 401

class LoginError(APIException):
    def __init__(self):
        self.detail = '账号或密码有误'
        self.status_code = 401

class EmailVerifyException(APIException):
    def __init__(self):
        self.detail = '验证信息有误'
        self.status_code = 400